home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Sprite 1984 - 1993
/
Sprite 1984 - 1993.iso
/
src
/
lib
/
c
/
unixSyscall
/
RCS
/
compatSig.h,v
< prev
next >
Wrap
Text File
|
1992-04-10
|
5KB
|
235 lines
head 1.4;
branch ;
access ;
symbols sprited:1.3.1;
locks ; strict;
comment @ * @;
1.4
date 92.04.10.14.46.54; author kupfer; state Exp;
branches ;
next 1.3;
1.3
date 90.06.26.18.41.20; author douglis; state Exp;
branches 1.3.1.1;
next 1.2;
1.2
date 90.02.08.13.44.01; author ouster; state Exp;
branches ;
next 1.1;
1.1
date 89.07.20.11.27.08; author nelson; state Exp;
branches ;
next ;
1.3.1.1
date 92.03.09.16.40.51; author kupfer; state Exp;
branches ;
next ;
desc
@@
1.4
log
@Use names instead of numbers for UNIX-specific signals.
@
text
@/*
* compatSig.h --
*
* Declarations of mapping tables between Sprite and UNIX signals.
* This used to be compatSig.c but now it shared between kernel and
* user compatibility libraries.
*
* Copyright 1986, 1988 Regents of the University of California
* Permission to use, copy, modify, and distribute this
* software and its documentation for any purpose and without
* fee is hereby granted, provided that the above copyright
* notice appear in all copies. The University of California
* makes no representations about the suitability of this
* software for any purpose. It is provided "as is" without
* express or implied warranty.
*
* $Header: proto.h,v 1.3 86/02/14 09:47:40 ouster Exp $ SPRITE (Berkeley)
*/
#ifndef _COMPATSIG
#define _COMPATSIG
#include <sprite.h>
/*
* Define the mapping between Unix and Sprite signals. There are two arrays,
* one to go from Unix to Sprite and one to go from Sprite to Unix.
*
* Note that the signals SIGIOT and SIGEMT that people don't usually
* send from the keyboard and that tend not to be delivered by the
* kernel but, rather, are used for IPC have been mapped to user-defined
* signal numbers, rather than a standard Sprite signal. This allows more
* of a one-to-one mapping.
*/
/*
* Map Unix signals to Sprite signals.
*/
int compat_UnixSigToSprite[] = {
NULL,
/* SIGHUP */ SIG_INTERRUPT,
/* SIGINT */ SIG_INTERRUPT,
/* SIGDEBUG */ SIG_DEBUG,
/* SIGILL */ SIG_ILL_INST,
/* SIGTRAP */ SIG_DEBUG,
/* SIGIOT */ SIG_IOT,
/* SIGEMT */ SIG_EMT,
/* SIGFPE */ SIG_ARITH_FAULT,
/* SIGKILL */ SIG_KILL,
/* SIGMIG */ SIG_MIGRATE_TRAP,
/* SIGSEGV */ SIG_ADDR_FAULT,
/* SIGSYS */ NULL,
/* SIGPIPE */ SIG_PIPE,
/* SIGALRM */ SIG_TIMER,
/* SIGTERM */ SIG_TERM,
/* SIGURG */ SIG_URGENT,
/* SIGSTOP */ SIG_SUSPEND,
/* SIGTSTP */ SIG_TTY_SUSPEND,
/* SIGCONT */ SIG_RESUME,
/* SIGCHLD */ SIG_CHILD,
/* SIGTTIN */ SIG_TTY_INPUT,
/* SIGTTOU */ SIG_TTY_OUTPUT,
/* SIGIO */ SIG_IO_READY,
/* SIGXCPU */ NULL,
/* SIGXFSZ */ NULL,
/* SIGVTALRM */ NULL,
/* SIGPROF */ NULL,
/* SIGWINCH */ SIG_WINDOW_CHANGE,
/* SIGMIGHOME */ SIG_MIGRATE_HOME,
/* SIGUSR1 */ SIG_USER1, /* user-defined signal 1 */
/* SIGUSR2 */ SIG_USER2, /* user-defined signal 1 */
/* NULL */ 32, /* not a signal, but NSIG is 32 so we need
an entry here. */
};
/*
* Map Sprite signals to Unix signals.
*/
static int spriteToUnix[] = {
NULL,
/* SIG_DEBUG */ SIGDEBUG,
/* SIG_ARITH_FAULT */ SIGFPE,
/* SIG_ILL_INST */ SIGILL,
/* SIG_ADDR_FAULT */ SIGSEGV,
/* SIG_KILL */ SIGKILL,
/* SIG_INTERRUPT */ SIGINT,
/* SIG_BREAKPOINT */ SIGILL,
/* SIG_TRACE_TRAP */ SIGILL,
/* SIG_MIGRATE_TRAP */ SIGMIG,
/* SIG_MIGRATE_HOME */ SIGMIGHOME,
/* SIG_SUSPEND */ SIGSTOP,
/* SIG_RESUME */ SIGCONT,
/* SIG_TTY_INPUT */ SIGTTIN,
/* SIG_PIPE */ SIGPIPE,
/* SIG_TIMER */ SIGALRM,
/* SIG_URGENT */ SIGURG,
/* SIG_CHILD */ SIGCHLD,
/* SIG_TERM */ SIGTERM,
/* SIG_TTY_SUSPEND */ SIGTSTP,
/* SIG_TTY_OUTPUT */ SIGTTOU,
/* 21 */ NULL,
/* 22 */ NULL,
/* 23 */ NULL,
/* 24 */ NULL,
/* 25 */ NULL,
/* SIG_IO_READY */ SIGIO,
/* SIG_WINDOW_CHANGE */ SIGWINCH,
/* SIG_IOT */ SIGIOT,
/* SIG_EMT */ SIGEMT,
/* SIG_USER1 */ SIGUSR1,
/* SIG_USER2 */ SIGUSR2,
/* 32 */ NULL,
};
#endif
@
1.3
log
@accept signal number 32 with a NULL mapping, rather than returning errors.
@
text
@d17 1
a17 1
* $Compat: proto.h,v 1.3 86/02/14 09:47:40 ouster Exp $ SPRITE (Berkeley)
d23 2
a24 1
#include "sprite.h"
d46 2
a47 2
/* SIGIOT */ 28,
/* SIGEMT */ 29,
d63 1
a63 1
/* SIGIO */ 26,
d68 1
a68 1
/* SIGWINCH */ 27,
d70 2
a71 2
/* SIGUSR1 */ 30, /* user-defined signal 1 */
/* SIGUSR2 */ 31, /* user-defined signal 1 */
d106 6
a111 6
/* 26 */ SIGIO,
/* 27 */ SIGWINCH,
/* 28 */ SIGIOT,
/* 29 */ SIGEMT,
/* 30 */ SIGUSR1,
/* 31 */ SIGUSR2,
@
1.3.1.1
log
@Initial branch for Sprite server.
@
text
@@
1.2
log
@Support SIGWINCH and SIGIO
@
text
@d71 2
d111 1
a113 1
static int numSignals = 31;
@
1.1
log
@Initial revision
@
text
@d62 1
a62 1
/* SIGIO */ NULL,
d67 1
a67 1
/* SIGWINCH */ NULL,
d103 2
a104 2
/* 26 */ NULL,
/* 27 */ NULL,
@